package com.common.core.utils;

import android.content.Context;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.telephony.TelephonyManager;

/**
 * Created by qujc on 15/6/14.
 */
public class DeviceTool {


    /**
     * 获取设备唯一标识
     * @return
     */
    public static String getDevId() {
        return ((TelephonyManager)ContextProvider.getApplicationContext()
                .getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId();
    }


    /**
     * 获取mac地址
     * @return
     */
    public static String getDevMac() {
        return ((WifiManager)ContextProvider.getApplicationContext()
                .getSystemService(Context.WIFI_SERVICE)).getConnectionInfo().getMacAddress();
    }


    /**
     * 获取手机厂商
     * @return
     */
    public static String getDevManuFacturer() {
        return Build.BRAND;
    }


    /**
     * 获取手机型号
     * @return
     */
    public static String getDevModel() {
        return Build.MODEL;
    }

}
